package com.fa.wisdom.adapter;

import android.widget.TextView;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.fa.wisdom.R;
import com.fa.wisdom.model.MsgEntity;

import java.util.List;


/**
 * Created by Steven on 2019/1/8.
 */
public class FoundRecycleAdapter extends BaseQuickAdapter<MsgEntity, BaseViewHolder> {
    private List<MsgEntity> list;

    public FoundRecycleAdapter(List<MsgEntity> newsList) {
        super(R.layout.item_msg, newsList);
        this.list = newsList;
    }


    @Override
    protected void convert(BaseViewHolder helper, MsgEntity item) {
        TextView title=helper.getView(R.id.tv_title);
        TextView time=helper.getView(R.id.tv_time);
        TextView content=helper.getView(R.id.content);
        time.setText(item.getTime());
        title.setText(item.getTitle());
        content.setText(item.getContent());
    }
}
